package com.aiwhose.aiwhosecore.bean.plublicaiwhose.bean;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data;

/**
 * @author 田国刚
 */
public class ReceiveMessageBean {
    /**
     * 文本消息实体
     */
    @Data
    @XStreamAlias("xml")
    public static class TextMessage {
        private String ToUserName; // 开发者微信号
        private String FromUserName; // 发送方账号（一个OpenID）
        private long CreateTime; // 消息创建时间
        private String MsgType = "text"; // 消息类型，这里是"text"
        private String Content; // 文本消息内容
        private String MsgId; // 消息id
        private String MsgDataId; // 消息的数据ID
        private String Idx; // 多图文时第几篇文章，从1开始
    }

    /**
     * 图片消息实体
     */
    @Data
    @XStreamAlias("xml")
    public static class ImageMessage {
        private String ToUserName; // 开发者微信号
        private String FromUserName; // 发送方账号（一个OpenID）
        private long CreateTime; // 消息创建时间
        private String MsgType = "image"; // 消息类型，这里是"image"
        private String PicUrl; // 图片链接
        private String MediaId; // 图片消息媒体id
        private long MsgId; // 消息id
        private String MsgDataId; // 消息的数据ID
        private String Idx; // 多图文时第几篇文章，从1开始
    }
    /**
     * 语音消息实体
     */
    @Data
    @XStreamAlias("xml")
    public static class VoiceMessage {
        private String ToUserName;
        private String FromUserName;
        private long CreateTime;
        private String MsgType = "voice";
        private String MediaId;
        private String Format;
        private String Recognition; // 语音识别结果，若开启语音识别
        private long MsgId;
        private String MsgDataId;
        private String Idx;
    }

    /**
     * 视频消息实体
     */
    @Data
    @XStreamAlias("xml")
    public static class VideoMessage {
        private String ToUserName;
        private String FromUserName;
        private long CreateTime;
        private String MsgType = "video";
        private String MediaId;
        private String ThumbMediaId;
        private long MsgId;
        private String MsgDataId;
        private String Idx;
    }

    /**
     * 小视频消息实体
     */
    @Data
    @XStreamAlias("xml")
    public static class ShortVideoMessage {
        private String ToUserName;
        private String FromUserName;
        private long CreateTime;
        private String MsgType = "shortvideo";
        private String MediaId;
        private String ThumbMediaId;
        private long MsgId;
        private String MsgDataId;
        private String Idx;
    }

    /**
     * 地理位置消息实体
     */
    @Data
    @XStreamAlias("xml")
    public static class LocationMessage {
        private String ToUserName;
        private String FromUserName;
        private long CreateTime;
        private String MsgType = "location";
        private double LocationX;
        private double LocationY;
        private int Scale;
        private String Label;
        private long MsgId;
        private String MsgDataId;
        private String Idx;
    }

    /**
     * 链接消息实体
     */
    @Data
    @XStreamAlias("xml")
    public static class LinkMessage {
        private String ToUserName;
        private String FromUserName;
        private long CreateTime;
        private String MsgType = "link";
        private String Title;
        private String Description;
        private String Url;
        private long MsgId;
        private String MsgDataId;
        private String Idx;
    }

    @Data
    @XStreamAlias("xml")
    public class  EventMessage {
        private String Ticket;
        private long CreateTime;
        private String EventKey;
        private String Event;
        private String ToUserName;
        private String FromUserName;
        private String MsgType;
    }
}
